using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace InfoExpress.ESM.WinApp.Popups
{
  public partial class FormTeacherBirthday : Form
  {
    public FormTeacherBirthday()
    {
      InitializeComponent();
    }

    private void FormTeacherBirthday_Load(object sender, EventArgs e)
    {
      cboMonth.SelectedText = DateTime.Today.Month.ToString();
      LoadData();
    }

    private void cboMonth_SelectedIndexChanged(object sender, EventArgs e)
    {
      LoadData();
    }

    private void LoadData()
    {
      int total = 0;
      gcTeacher.DataSource =
        GlobalCache.TeacherService.GetPaged("MONTH(Birthday)=" + cboMonth.SelectedItem.ToString(), "Birthday ASC", 0, 1000, out total);
    }
  }
}